package yogiro.to;

public class ProductPhotoTO {
	
	private int productPhotoNo;
	private String productPhotoName;
	private int productNo;
	
	public ProductPhotoTO(){}

	public ProductPhotoTO(int productPhotoNo, String productPhotoName,
			int productNo) {
		super();
		this.productPhotoNo = productPhotoNo;
		this.productPhotoName = productPhotoName;
		this.productNo = productNo;
	}

	public int getProductPhotoNo() {
		return productPhotoNo;
	}

	public void setProductPhotoNo(int productPhotoNo) {
		this.productPhotoNo = productPhotoNo;
	}

	public String getProductPhotoName() {
		return productPhotoName;
	}

	public void setProductPhotoName(String productPhotoName) {
		this.productPhotoName = productPhotoName;
	}

	public int getProductNo() {
		return productNo;
	}

	public void setProductNo(int productNo) {
		this.productNo = productNo;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + productNo;
		result = prime * result + productPhotoNo;
		result = prime
				* result
				+ ((productPhotoName == null) ? 0 : productPhotoName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ProductPhotoTO other = (ProductPhotoTO) obj;
		if (productNo != other.productNo)
			return false;
		if (productPhotoNo != other.productPhotoNo)
			return false;
		if (productPhotoName == null) {
			if (other.productPhotoName != null)
				return false;
		} else if (!productPhotoName.equals(other.productPhotoName))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "ProductPhotoTO [productPhotoNo=" + productPhotoNo
				+ ", productPhotoName=" + productPhotoName + ", productNo="
				+ productNo + "]";
	}
	
	
	
}
